module.exports = function (app) {
    const prefix = '/wap/system/';
    // API::登录
    app.post(prefix + 'login', (req, res) => {
        const code = 200;
        const msg = '';
        const data = {'res': 1, 'userId': 13};
        const time = +(new Date);
        const result = {code, data, msg, time};
        return res.end(JSON.stringify(result));
    });
    const menulist = {
        'list': {
            'listMenu': [
                {'auth_id': 85, 'auth_name': '通讯录权限', 'children': []},
                {'auth_id': 77, 'auth_name': '任务管理', 'children': [
                    {'auth_id': 79, 'auth_name': '下属任务'},
                    {'auth_id': 78, 'auth_name': '我的任务'}
                ]}
            ],
            'listPages':[]
        }
    };
    // API::权限列表
    app.get(prefix + 'menulist', (req, res) => {
        const code = 200;
        const msg = '';
        const data = menulist;
        const time = +(new Date);
        const result = {code, data, msg, time};
        return res.end(JSON.stringify(result));
    });
};
